package indexdto

import (
	"github.com/gogf/gf/v2/frame/g"
	"xr-game-server/entity"
	"xr-game-server/module/protocol"
)

type IndexReq struct {
	g.Meta `path:"/getAll" method:"post" summary:"首页基础信息" tags:"首页"`
}

type IndexRes struct {
	Res []*protocol.ItemModel `json:"res" dc:"资源列表"`
	Lv  *LvDto                `json:"lv" dc:"等级数据"`
}

func NewIndexRes(data []*protocol.ItemModel, roleData *entity.PlayerRole) *IndexRes {
	return &IndexRes{
		Res: data,
		Lv:  NewLvDto(roleData),
	}
}
